-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathepkg
executable file
·296 lines (283 loc) · 8.75 KB
/
epkg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
#!/usr/bin/env bash
source /usr/lib64/epkg/libepkg
checkroot
checksystemmode
action=$1
shift
case "$action" in
install)
if [ "$1" != "--skip-check" ] ; then
checksync
emerge -av "${@}"
else
shift
emerge -av "$@"
fi
;;
install-no-collision)
checksync
FEATURES="parallel-fetch -collision-protect -protect-owned candy compressdebug splitdebug" emerge -av "$@"
;;
install-bin-pkg)
checksync
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --getbinpkg " emerge -av "$@"
;;
remove)
if [ "$1" != "--skip-check" ] ; then
checksync
emerge --depclean -av "$@"
else
shift
emerge --depclean -av "$@"
fi
;;
configure)
if [ "$1" != "--skip-check" ] ; then
checksync
emerge --config "$@"
else
shift
emerge --config "$@"
fi
;;
backuppkg)
PKGDIR="${PKGDIR:-}" backuppkg "$@"
;;
forceremove)
checksync
emerge --unmerge -av "$@"
;;
clean)
if [ "$1" != "--skip-check" ] ; then
checksync
emerge --depclean -av
else
shift
emerge --depclean -av
fi
;;
cleanoutdated)
cleanoutdated
;;
cleanlocalpkg)
cleanlocalpkg
;;
upgrade)
if [ "$1" != "--skip-check" ] ; then
checksync
PKGDIR="${PKGDIR:-}" DISTDIR="${DISTDIR:-}" set_var_cache_dir
emerge -uDvaN @system @world "$@" --backtrack=150
else
shift
PKGDIR="${PKGDIR:-}" DISTDIR="${DISTDIR:-}" set_var_cache_dir
emerge -uDvaN @system @world "$@" --backtrack=150
fi
;;
upgrade-full)
checksync
emerge -uDvaN --with-bdeps=y @system @world "$@" --backtrack=150
;;
upgrade-specific)
checksync
emerge -uDvaN "$@" --backtrack=150
;;
upgrade-nocol)
checksync
FEATURES="parallel-fetch -collision-protect -protect-owned candy compressdebug splitdebug" emerge -uDvaN --with-bdeps=y @system @world "$@" --backtrack=150
;;
autoinstall)
if [ "$1" != "--skip-check" ] ; then
fetchminimalsync
emerge -v "$@"
else
shift
emerge -v "$@"
fi
;;
autoinstall-no-collision)
fetchminimalsync
FEATURES="parallel-fetch -collision-protect -protect-owned candy compressdebug splitdebug" emerge -v "$@"
;;
autoinstall-bin-pkg)
fetchminimalsync
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --getbinpkg " emerge -v "$@"
;;
autoremove)
fetchminimalsync
emerge --depclean -v "$@"
;;
reinstall-depend)
reinstall-depend "$@"
;;
backupallpkg)
PKGDIR="${PKGDIR:-}" backupallpkg $( qlist -IvC ) "$@"
;;
recompile)
recompilepkg "$@"
;;
recompilepkg)
recompilepkg "$@"
;;
recompileallpkg)
argentsync
cleanoutdated
recompileallpkg
;;
recompile-depend)
recompile-depend "$@"
;;
recompile-depend-new)
recompile-depend-new "$@"
;;
src-newuse)
src-newuse "$@"
;;
buildpkgonly)
buildpkgonly "$@"
;;
buildinstall)
PKGDIR="${PKGDIR:-}" buildinstall "$@"
;;
autobuildinstall)
PKGDIR="${PKGDIR:-}" autobuildinstall "$@"
;;
autoreinstall-depend)
autoreinstall-depend "$@"
;;
autorecompile)
argentsync
autorecompilepkg "$@"
;;
autorecompilepkg)
argentsync
autorecompilepkg "$@"
;;
autorecompile-depend)
autorecompile-depend "$@"
;;
autorecompile-depend-new)
cleanoutdated
autorecompile-depend-new "$@"
;;
autorecompileallpkg)
argentsync
cleanoutdated
autorecompileallpkg
;;
autoforceremove)
argentsync
emerge --unmerge -v "$@"
;;
autoclean)
fetchminimalsync
emerge --depclean -q
;;
autobuildpkgonly)
if [ "$1" != "--skip-update" ] ; then
argentsync
cleanoutdated
autobuildpkgonly "$@"
else
shift
autobuildpkgonly "$@"
fi
;;
autoupgrade)
fetchminimalsync
emerge -uDvN @system @world "$@"
;;
autoupgrade-full)
fetchminimalsync
emerge -uDvN --with-bdeps=y @system @world "$@"
;;
autoupgrade-nocol)
fetchminimalsync
FEATURES="parallel-fetch -collision-protect -protect-owned candy compressdebug splitdebug" emerge -uDvN --with-bdeps=y @system @world "$@"
;;
upgrade-specific)
emerge -uDvN "$@"
;;
remove-orphans)
remove-orphans
;;
fetchsourcepkg)
fetchsourcepkg "$@"
;;
fetchbinpkg)
fetchbinpkg "$@"
;;
search)
emerge -s "$@"
;;
update)
PKGDIR="${PKGDIR:-}" DISTDIR="${DISTDIR:-}" set_var_cache_dir
fetchminimalsync
;;
devsync)
argentsync
;;
force-sync)
forcesync
;;
sysinfo)
emerge --info
;;
*)
cat <<-"EOH"
Usage: epkg command [package(s)]
epkg is a simple wrapper around portage, gentoolkit, and portage-utils that provides an
apt-get/yum-alike interface to these commands, to assist people transitioning from
Debian/RedHat-based systems to Gentoo. It is a fork of unmaintained github.com/jdhore/epkg.
Commands :
install - Install new packages
remove - Remove packages safely
configure - Configure packages as per ebuilds settings
backuppkg - Backup specific packages with own configurations for later use
forceremove - *Unsafely* remove packages
clean - Remove packages that are no longer needed
cleanoutdated - Remove local saved and outdated packages
cleanlocalpkg - Remove all locally saved package ( including index ) usually in /usr/portage/packages
upgrade - Upgrade system. No build dependencies are upgraded
upgrade-full - Upgrade system. All build dependencies included for upgrade
upgrade-nocol - Upgrade system without collision protection
upgrade-specific - Upgrade specific package(s)
install-no-collision - Install a package forcefully without collision protection
install-bin-pkg - Install only a precompiled binary package if available
autoinstall - Install new packages (no confirmation)
autoinstall-no-collision - Install new package forcefully without collision protection ( no confirmation )
autoinstall-bin-pkg - Install only a precompiled binary package if available ( no confirmation )
autoremove - Remove packages safely (no confirmation)
reinstall-depend - Reinstall all dependencies of given package(s) based on current version/revision
src-newuse - Check a specific package if it has to be reinstalled due to USE flag change ( portage-specific )
devsync - Upgrade all Portage overlay structure with needed ebuilds for development / compilation
backupallpkg - Backup the whole system. Usually in /usr/portage/packages
recompile - Recompile and install packages with self-defined options ( man portage )
recompilepkg - Recompile and install packages with self-defined options ( man portage )
recompileallpkg - Recompile, install and save all the packages locally ( usually in /usr/portage/packages/ )
recompile-depend - Compile/Recompile all currently installed packages that depend on given package(s)
recompile-depend-new - Compile/Recompile all newly installed packages that depend on given package(s)
buildpkgonly - Build/Recompile package(s) and export them locally ( usually in /usr/portage/packages )
buildinstall - Recompile/Build package(s) and install them immediately ( usually in /usr/portage/packages )
autoupgrade - Upgrade system (no confirmation). No build dependencies are upgraded
autoupgrade-full - Upgrade system ( no confirmation ). All build dependencies included for upgrade
autoupgrade-nocol - Upgrade system without collision protection ( no confirmation )
autoupgrade-specific - Upgrade specific package(s) ( no confirmation )
autoreinstall-depend - Reinstall all dependencies of given package(s) based on current version/revision ( no confirmation )
autorecompile - Recompile packages with self-defined options ( no confirmation )
autorecompilepkg - Recompile packages with self-defined options ( no confirmation )
autorecompileallpkg - Recompile and save all the packages in the system ( no confirmation )
autorecompile-depend - Compile/Recompile all currently installed packages that depend on given package(s) ( no confirmation )
autorecompile-depend-new - Compile/Recompile all newly-installed packages that depend on given package(s) ( no confirmation )
autoforceremove - *Unsafely* remove packages (no confirmation)
autoclean - Remove packages that are no longer needed (no confirmation)
autobuildpkgonly - Build/Recompile package(s) and export them locally ( no confirmation )
autobuildinstall - Build/Recompile package(s) and autoinstall them immediately ( no confirmation )
remove-orphans - Remove orphaned packages ( with confirmation )
fetchbinpkg - Downloads only binaries from remote
fetchsourcepkg - Downloads the source of the program. Usually in /usr/portage/distfiles/
search - Search for packages
update - Resync portage tree, portage config && argent-ws overlay
sysinfo - Display information about installed core packages and portage configuration
EOH
;;
esac