summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--FAQ2
-rw-r--r--FAQ.html2
-rw-r--r--doc/slapt-get.82
-rw-r--r--po/bg.po4
-rw-r--r--po/cs.po6
-rw-r--r--po/cz.po2
-rw-r--r--po/de.po6
-rw-r--r--po/el.po6
-rw-r--r--po/en.po6
-rw-r--r--po/es.po6
-rw-r--r--po/es_ES.po6
-rw-r--r--po/fr.po6
-rw-r--r--po/id.po6
-rw-r--r--po/it.po6
-rw-r--r--po/ja.po6
-rw-r--r--po/nl.po6
-rw-r--r--po/no.po6
-rw-r--r--po/pl.po6
-rw-r--r--po/pt_BR.po6
-rw-r--r--po/pt_PT.po6
-rw-r--r--po/ru.po6
-rw-r--r--po/sk.po6
-rw-r--r--po/sl.po6
-rw-r--r--po/slapt-get.pot4
-rw-r--r--po/sv.po6
-rw-r--r--po/uk.po6
-rw-r--r--po/vi.po6
-rw-r--r--po/zh_CN.po6
-rw-r--r--src/action.c58
-rw-r--r--src/main.c4
-rw-r--r--src/package.c43
-rw-r--r--src/package.h6
33 files changed, 154 insertions, 106 deletions
diff --git a/ChangeLog b/ChangeLog
index 390965e..3f3ea36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.9.11e Jul 26, 2006
+ * --remove-obsolete now works with --remove as well as --dist-upgrade
* added support for downloading compressed ChangeLog.txt.gz
* updated Polish translation with small updates from Lukasz Stlmach
* updated documentation (thanks sky@hi.eclipse.co.uk)
diff --git a/FAQ b/FAQ
index 7b39feb..85198af 100644
--- a/FAQ
+++ b/FAQ
@@ -891,7 +891,7 @@ Frequently Asked Questions:
part of the basic Slackware install. If you only have the official Slackware
package sources in your slapt-getrc file, then you can do the following:
- # slapt-get --dist-upgrade --remove-obsolete
+ # slapt-get --remove --remove-obsolete
NOTE: You will want to exclude any packages that are self made so they are
not removed.
diff --git a/FAQ.html b/FAQ.html
index 312df1b..4ac408e 100644
--- a/FAQ.html
+++ b/FAQ.html
@@ -905,7 +905,7 @@
part of the basic Slackware install. If you only have the official Slackware
package sources in your slapt-getrc file, then you can do the following:
- # slapt-get --dist-upgrade --remove-obsolete
+ # slapt-get --remove --remove-obsolete
NOTE: You will want to exclude any packages that are self made so they are
not removed.
diff --git a/doc/slapt-get.8 b/doc/slapt-get.8
index bb960a1..95d0992 100644
--- a/doc/slapt-get.8
+++ b/doc/slapt-get.8
@@ -157,7 +157,7 @@ Show the download statistics
Specify file location of slapt-get configuration. This overrides the default location, /etc/slapt-get/slapt-getrc.
.TP
.B --remove-obsolete
-Remove installed packages that are no longer available. This works for dist-upgrade only. This removes packages that are no longer available from any current package sources, but are currently installed. Be careful as this will also remove custom built packages.
+Remove installed packages that are no longer available. This works for dist-upgrade and --remove only. This removes packages that are no longer available from any current package sources, but are currently installed. Be careful as this will also remove custom built packages.
.TP
.B --retry []
Specify the number of retries to attempt if the package download fails.
diff --git a/po/bg.po b/po/bg.po
index 8411c37..9ed0afb 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-24 20:50+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Victor Keranov <victor_keranov@mail.bg>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,7 +448,7 @@ msgstr "Предложени пакети:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "изчистване на кеширани стари и неизползваеми пакети"
-msgid "remove obsolete packages (dist-upgrade only)"
+msgid "remove obsolete packages"
msgstr "премахване на остарели пакети (само при dist-upgrade)"
#, c-format
diff --git a/po/cs.po b/po/cs.po
index 90b5300..f084d72 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Oto Petrik <oto.petrik@centrum.cz>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Navrhovan balky:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "vyist pouze cache starch, nedostupnch balk"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "odstran zastaral balky (pouze dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr "odstran zastaral balky"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/cz.po b/po/cz.po
index 86e2052..c5fef80 100644
--- a/po/cz.po
+++ b/po/cz.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Oto Petrik <oto.petrik@centrum.cz>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
diff --git a/po/de.po b/po/de.po
index 15ec581..2b8772f 100644
--- a/po/de.po
+++ b/po/de.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11e\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-07-14 12:38+0200\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Manfred Mueller <nekdesk@nekdesk.de>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -450,8 +450,8 @@ msgstr "Vorgeschlagene Pakete:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "Nur alte, nicht mehr verfuegbare Pakete aus Zwischenspeicher entfernen"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "Entferne veraltete Pakete (nur bei dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr "Entferne veraltete Pakete"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/el.po b/po/el.po
index 8bf9702..e63d896 100644
--- a/po/el.po
+++ b/po/el.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Savvas Eftratiadis <pigouinos@mailworks.org.\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr " :\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "only purge cache of older, unreacheable pkgs"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "remove obsolete packages (dist-upgrade only)"
+msgid "remove obsolete packages"
+msgstr "remove obsolete packages"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/en.po b/po/en.po
index 1ab4265..52de505 100644
--- a/po/en.po
+++ b/po/en.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Jason Woodward <woodwardj@jaos.org>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Suggested packages:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "only purge cache of older, unreacheable pkgs"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "remove obsolete packages (dist-upgrade only)"
+msgid "remove obsolete packages"
+msgstr "remove obsolete packages"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/es.po b/po/es.po
index 22a059e..cb1df24 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Ruben Gutierrez <ruben@snpp.com.ar>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Suggested packages:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "only purge cache of older, unreacheable pkgs"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "remove obsolete packages (dist-upgrade only)"
+msgid "remove obsolete packages"
+msgstr "remove obsolete packages"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/es_ES.po b/po/es_ES.po
index 52ec9f2..e5483d3 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Ruben Gutierrez <ruben@snpp.com.ar>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Suggested packages:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "only purge cache of older, unreacheable pkgs"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "remove obsolete packages (dist-upgrade only)"
+msgid "remove obsolete packages"
+msgstr "remove obsolete packages"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/fr.po b/po/fr.po
index 801ef76..0096247 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translators: Verachten Bruno <gounthar@gmail.com>, solsTiCe d'Hiver <solstice.dhiver@laposte.net>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Paquets suggrs:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "purge uniquement le cache des anciens paquets non atteignables"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "supprime les paquets obsoltes (seulement pour dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr "supprime les paquets obsoltes"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/id.po b/po/id.po
index d4914cc..bb022a2 100644
--- a/po/id.po
+++ b/po/id.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Kemas Antonius <kyantonius@kyantonius.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Paket-paket yang disarankan:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "hanya buang habis data sementara yang tersimpan untuk pkg yang sudah lama dan tidak tesedia lagi"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "hapus pkg yang tidak perlu (hanya untuk dist-upgrade saja)"
+msgid "remove obsolete packages"
+msgstr "hapus pkg yang tidak perlu"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/it.po b/po/it.po
index 2f62b3d..27982b7 100644
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Francesco Gigli <jaramir@slack.it>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Suggested packages:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "only purge cache of older, unreacheable pkgs"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "remove obsolete packages (dist-upgrade only)"
+msgid "remove obsolete packages"
+msgstr "remove obsolete packages"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/ja.po b/po/ja.po
index 9575af0..33b4de1 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11e\n"
"POT-Creation-Date: 2006-03-08 19:49+0900\n"
-"PO-Revision-Date: 2006-05-29 18:56+0900\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: JW <J_W@somewhere.c0.jp>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -450,8 +450,8 @@ msgstr "推奨パッケージ:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "only purge cache of older, unreacheable pkgs"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "obsolete対象パッケージを削除 (dist-upgrade only)"
+msgid "remove obsolete packages"
+msgstr "obsolete対象パッケージを削除"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/nl.po b/po/nl.po
index dadacad..7c7bce0 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Stefan Koopmanschap <stefan@electronicmusicworld.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Aanbevolen packages:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "verwijder alleen de cache van oudere, niet bereikbare pkgs"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "verwijder niet meer gebruikte packages (alleen dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr "verwijder niet meer gebruikte packages"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/no.po b/po/no.po
index 7f699e0..f9ab83a 100644
--- a/po/no.po
+++ b/po/no.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Joran Kvalvaag <jk@nerdworks.org>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Anbefalte pakker:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "slett bare mellomlager av eldre utilgjengelige pakker"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "fjern gamle pakker (kun dist-oppgradering)"
+msgid "remove obsolete packages"
+msgstr "fjern gamle pakker"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/pl.po b/po/pl.po
index bf6713b..d69c865 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-21 08:51+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translators: Sajmon <sajmon@tenboard.com>, Paul Blazejowski <paulb@blazebox.homeip.net>, nixon <nixon@klub.chip.pl> and simon <ssiimm@poczta.onet.pl>\n"
"Language-Team: polish slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -449,8 +449,8 @@ msgstr "Podane pakiety:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "usu tylko stare, niedostpne pkgs z cache"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "usu przestarzae pakiety (tylko dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr "usu przestarzae pakiety"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 58e7bc4..5b7ebb5 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Henrique Pinto <henrique.pinto@kdemail.net>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Pacotes sugeridos:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "only purge cache of older, unreacheable pkgs"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "remove obsolete packages (dist-upgrade only)"
+msgid "remove obsolete packages"
+msgstr "remove obsolete packages"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 96cf817..3ce5b62 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11e\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-29 23:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Miguel Santinho <msantinho@simplicidade.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Pacotes sugeridos:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "eliminar da cache apenas os pacotes antigos, desactualizados"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "remover pacotes obsoletos (apenas em dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr "remover pacotes obsoletos"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/ru.po b/po/ru.po
index f7e3040..7b30632 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2005-09-07 23:24 EEST\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translators: sin <digitalhunger@gmail.com>\n"
"Language-Team: DeepStyle Team <hottab@deepstyle.org.ua>\n"
"MIME-Version: 1.0\n"
@@ -449,8 +449,8 @@ msgstr " :\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr " , "
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr " ( dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr " "
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/sk.po b/po/sk.po
index 837c70b..9ec2206 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2005-06-23 21:28+0500\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Erik Gyepes <depi@depi.sk>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Navrhovan balky:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "vyist len cache starch, nedostupnch balkov"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "odstrni zastaral balky (len dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr "odstrni zastaral balky"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/sl.po b/po/sl.po
index 0b3d017..ecaf234 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2005-03-09\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Uros Trsavec <utrsav@walla.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Predlagani paketi:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "poisti samo predpomnilnik stareji, nedosgljivih paketkov"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "odtrani zastarele paketke (dist-upgrade samo)"
+msgid "remove obsolete packages"
+msgstr "odtrani zastarele paketke"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/slapt-get.pot b/po/slapt-get.pot
index 958b99f..f316fae 100644
--- a/po/slapt-get.pot
+++ b/po/slapt-get.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11b\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-02-07 16:28+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Jason Woodward <woodwardj@jaos.org>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,7 +448,7 @@ msgstr ""
msgid "only purge cache of older, unreacheable pkgs"
msgstr ""
-msgid "remove obsolete packages (dist-upgrade only)"
+msgid "remove obsolete packages"
msgstr ""
#, c-format
diff --git a/po/sv.po b/po/sv.po
index e82750c..61692b4 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Joel Bjurman <ypolt@lediga.st>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "Freslagna paket:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "ta bara bort de temporra filerna av ldre, onbara paket"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "ta bort frlegade paket (endast dist-uppgradering)"
+msgid "remove obsolete packages"
+msgstr "ta bort frlegade paket"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/uk.po b/po/uk.po
index 4c1a47f..e2c8246 100644
--- a/po/uk.po
+++ b/po/uk.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2005-09-07 23:24 EEST\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translators: sin <digitalhunger@gmail.com>\n"
"Language-Team: DeepStyle Team <hottab@deepstyle.org.ua>\n"
"MIME-Version: 1.0\n"
@@ -449,8 +449,8 @@ msgstr "Φ :\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "Ԧ , ˦"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr " Ҧ̦ (Ԧ dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr " Ҧ̦ "
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/vi.po b/po/vi.po
index c492ee4..a5ca67a 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Nguyễn Văn Vũ <vncasper@yahoo.com>\n"
"Language-Team: gnome-vi <gnomevi-list@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -450,8 +450,8 @@ msgstr "Những gói phần mềm được đề nghị:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "chỉ xoá những gói phần mềm cũ, không còn sử dụng"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "gỡ bỏ những gói phần mềm cũ (chỉ có hiệu lực với tùy chọn --dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr "gỡ bỏ những gói phầ"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 09b293e..f734587 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.11c\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2006-05-20 22:22+0500\n"
+"PO-Revision-Date: 2006-07-26 23:08+0500\n"
"Last-Translator: Yang Jinsong <shannleon@gmail.com>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -448,8 +448,8 @@ msgstr "建议安装的软件包:\n"
msgid "only purge cache of older, unreacheable pkgs"
msgstr "只清除过时和无法获取的软件包"
-msgid "remove obsolete packages (dist-upgrade only)"
-msgstr "删除老旧的软件包 (只适用于 dist-upgrade)"
+msgid "remove obsolete packages"
+msgstr "删除老旧的软"
#, c-format
msgid "You don't have enough free space in %s\n"
diff --git a/src/action.c b/src/action.c
index afd5566..6672337 100644
--- a/src/action.c
+++ b/src/action.c
@@ -229,8 +229,11 @@ void slapt_pkg_action_remove(const slapt_rc_config *global_config,
slapt_regex_t *pkg_regex = NULL;
slapt_transaction_t *tran = NULL;
+ printf(gettext("Reading Package Lists... "));
installed_pkgs = slapt_get_installed_pkgs();
avail_pkgs = slapt_get_available_pkgs();
+ printf(gettext("Done\n"));
+
tran = slapt_init_transaction();
if ((pkg_regex = slapt_init_regex(SLAPT_PKG_LOG_PATTERN)) == NULL) {
exit(EXIT_FAILURE);
@@ -293,6 +296,21 @@ void slapt_pkg_action_remove(const slapt_rc_config *global_config,
}
+ if (global_config->remove_obsolete == SLAPT_TRUE) {
+ struct slapt_pkg_list *obsolete = slapt_get_obsolete(
+ global_config, avail_pkgs, installed_pkgs);
+
+ for (i = 0; i < obsolete->pkg_count; ++i) {
+ if ( slapt_is_excluded(global_config,obsolete->pkgs[i]) != 1 ) {
+ slapt_add_remove_to_transaction(tran,obsolete->pkgs[i]);
+ } else {
+ slapt_add_exclude_to_transaction(tran,obsolete->pkgs[i]);
+ }
+ }
+
+ slapt_free_pkg_list(obsolete);
+ }
+
slapt_free_pkg_list(installed_pkgs);
slapt_free_pkg_list(avail_pkgs);
slapt_free_regex(pkg_regex);
@@ -585,43 +603,21 @@ void slapt_pkg_action_upgrade_all(const slapt_rc_config *global_config)
/* remove obsolete packages if prompted to */
if ( global_config->remove_obsolete == SLAPT_TRUE ) {
unsigned int r;
+ struct slapt_pkg_list *obsolete = slapt_get_obsolete(
+ global_config, avail_pkgs, installed_pkgs);
- for (r = 0; r < installed_pkgs->pkg_count; ++r) {
+ for (r = 0; r < obsolete->pkg_count; ++r) {
- /*
- * if we can't find the installed package in our available pkg list,
- * it must be obsolete
- */
- if (slapt_get_newest_pkg(avail_pkgs,
- installed_pkgs->pkgs[r]->name) == NULL) {
- struct slapt_pkg_list *deps;
- unsigned int c;
- /*
- any packages that require this package we are about to remove
- should be scheduled to remove as well
- */
- deps = slapt_is_required_by(global_config,avail_pkgs,
- installed_pkgs->pkgs[r]);
- for (c = 0; c < deps->pkg_count; ++c ) {
- if ( slapt_get_exact_pkg(avail_pkgs,deps->pkgs[c]->name,
- deps->pkgs[c]->version) == NULL ) {
- if ( slapt_is_excluded(global_config,deps->pkgs[c]) != 1 ) {
- slapt_add_remove_to_transaction(tran,deps->pkgs[c]);
- } else {
- slapt_add_exclude_to_transaction(tran,deps->pkgs[c]);
- }
- }
- }
- slapt_free_pkg_list(deps);
- if (slapt_is_excluded(global_config,installed_pkgs->pkgs[r]) != 1) {
- slapt_add_remove_to_transaction(tran,installed_pkgs->pkgs[r]);
- } else {
- slapt_add_exclude_to_transaction(tran,installed_pkgs->pkgs[r]);
- }
+ if ( slapt_is_excluded(global_config,obsolete->pkgs[r]) != 1 ) {
+ slapt_add_remove_to_transaction(tran,obsolete->pkgs[r]);
+ } else {
+ slapt_add_exclude_to_transaction(tran,obsolete->pkgs[r]);
}
}
+ slapt_free_pkg_list(obsolete);
+
}/* end if remove_obsolete */
/* insurance so that all of slapt-get's requirements are also installed */
diff --git a/src/main.c b/src/main.c
index 7d5de34..4eaf14d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -222,6 +222,8 @@ int main( int argc, char *argv[] )
case INSTALL:
case INSTALL_DISK_SET:
case REMOVE:
+ if (global_config->remove_obsolete == SLAPT_TRUE)
+ break;
case SHOW:
case SEARCH:
if ( optind >= argc )
@@ -390,7 +392,7 @@ void usage(void)
printf(" --print-uris - %s\n",gettext("print URIs only, do not download"));
printf(" --show-stats|-S - %s\n",gettext("show download statistics"));
printf(" --config|-c [] - %s\n",gettext("specify alternate slapt-getrc location"));
- printf(" --remove-obsolete - %s\n",gettext("remove obsolete packages (dist-upgrade only)"));
+ printf(" --remove-obsolete - %s\n",gettext("remove obsolete packages"));
printf(" --retry [] - %s\n",gettext("specify number of download retry attempts"));
printf(" --no-upgrade - %s\n",gettext("install package, do not attempt to upgrade"));
}
diff --git a/src/package.c b/src/package.c
index 1d39ffa..06d13dd 100644
--- a/src/package.c
+++ b/src/package.c
@@ -3258,3 +3258,46 @@ char *slapt_stringify_pkg(const slapt_pkg_info_t *pkg)
return pkg_str;
}
+struct slapt_pkg_list *
+ slapt_get_obsolete( const slapt_rc_config *global_config,
+ struct slapt_pkg_list *avail_pkgs,
+ struct slapt_pkg_list *installed_pkgs)
+{
+ unsigned int r;
+ struct slapt_pkg_list *obsolete = slapt_init_pkg_list();
+
+ for (r = 0; r < installed_pkgs->pkg_count; ++r) {
+
+ /*
+ * if we can't find the installed package in our available pkg list,
+ * it must be obsolete
+ */
+ if (slapt_get_newest_pkg(avail_pkgs, installed_pkgs->pkgs[r]->name) == NULL) {
+ struct slapt_pkg_list *deps;
+ unsigned int c;
+
+ /*
+ any packages that require this package we are about to remove
+ should be scheduled to remove as well
+ */
+ deps = slapt_is_required_by(global_config,avail_pkgs,
+ installed_pkgs->pkgs[r]);
+
+ for (c = 0; c < deps->pkg_count; ++c ) {
+
+ if ( slapt_get_exact_pkg(avail_pkgs,deps->pkgs[c]->name,
+ deps->pkgs[c]->version) == NULL ) {
+ slapt_add_pkg_to_pkg_list(obsolete,deps->pkgs[c]);
+ }
+ }
+
+ slapt_free_pkg_list(deps);
+
+ slapt_add_pkg_to_pkg_list(obsolete, installed_pkgs->pkgs[r]);
+
+ }
+
+ }
+
+ return obsolete;
+}
diff --git a/src/package.h b/src/package.h
index 15247da..f8aedf4 100644
--- a/src/package.h
+++ b/src/package.h
@@ -142,6 +142,12 @@ int slapt_upgrade_pkg(const slapt_rc_config *global_config,
*/
int slapt_remove_pkg(const slapt_rc_config *,slapt_pkg_info_t *);
+/* get a list of obsolete packages */
+struct slapt_pkg_list *
+ slapt_get_obsolete( const slapt_rc_config *global_config,
+ struct slapt_pkg_list *avail_pkgs,
+ struct slapt_pkg_list *installed_pkgs);
+
/*
generate a short description, returns (char *) on success or NULL on error