aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2005-01-07 01:40:00 +0000
committerJason Woodward2005-01-07 01:40:00 +0000
commitec60d81177ddfef88a82b6ecd63dfcef2961b551 (patch)
treec39bf1fde85f7e96a0c5a6481e0184998aa12018
parent8c5f0eabb62b3b488d303ad8222cd322f2562a17 (diff)
downloadslapt-get-ec60d81177ddfef88a82b6ecd63dfcef2961b551.tar.gz
ensured --remove-obsolute ignores excluded packages
-rw-r--r--ChangeLog1
-rw-r--r--FAQ24
-rw-r--r--FAQ.html24
-rw-r--r--src/action.c9
4 files changed, 37 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c926fb..c0099f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.9.9f Jan 06, 2005
+ * ensured --remove-obsolute ignores excluded packages
* updated translations
* added --remove-obsolete option for dist-upgrade (see FAQ #9 and #28)
* fixed bug in gen_short_pkg_description with installed packages that are
diff --git a/FAQ b/FAQ
index 5a04d9d..d659e24 100644
--- a/FAQ
+++ b/FAQ
@@ -164,13 +164,15 @@ Frequenty Asked Questions:
### then, let slapt-get upgrade the rest
$ slapt-get --dist-upgrade
- ### or you can specify --remove-obsolete to remove
- ### all depreciated packages. CAUTION: this can only
- ### take into consideration packages that are available
- ### from your current sources. Thus self made packages
- ### will be considered obsolete as well. Only use this
- ### if you have been using Slackware packages exclusively.
- ### You can also use this option for information purposes.
+ Or you can specify --remove-obsolete to remove all depreciated packages.
+ CAUTION: this can only take into consideration packages that are available
+ from your current sources. Thus self made packages will be considered
+ obsolete as well (they can be excluded within slapt-getrc, however). Only
+ use this if you have been using Slackware packages exclusively. You can
+ also use this option for information purposes, observing the obsolete
+ packages, then passing all the ones you are sure of to --remove (which can
+ accept multiple packages at once).
+ ### dist upgrade and remove all depreciated/obsolete packages
$ slapt-get --dist-upgrade --remove-obsolete
Then follow the rest of the directions in UPGRADE.TXT.
@@ -625,8 +627,9 @@ Frequenty Asked Questions:
--dist-upgrade --remove-obsolete will remove any packages that Pat has removed
from current. CAUTION: this can only take into consideration packages that
are available from your current sources. Thus self made packages will be
- considered obsolete as well. Only use this if you have been using Slackware
- packages exclusively. You can also use this option for information purposes.
+ considered obsolete as well (they can be excluded within slapt-getrc, however).
+ Only use this if you have been using Slackware packages exclusively. You can
+ also use this option for information purposes.
29. How would I script an ldd dependency hack with slapt-get?
@@ -865,6 +868,9 @@ Frequenty Asked Questions:
# slapt-get --dist-upgrade --remove-obsolete
+ NOTE: You will want to exclude any packages that are self made so they are
+ not removed.
+
41. What provisions have you made for dialup users?
diff --git a/FAQ.html b/FAQ.html
index 61d9e32..6d0fdd7 100644
--- a/FAQ.html
+++ b/FAQ.html
@@ -178,13 +178,15 @@
### then, let slapt-get upgrade the rest
$ slapt-get --dist-upgrade
- ### or you can specify --remove-obsolete to remove
- ### all depreciated packages. CAUTION: this can only
- ### take into consideration packages that are available
- ### from your current sources. Thus self made packages
- ### will be considered obsolete as well. Only use this
- ### if you have been using Slackware packages exclusively.
- ### You can also use this option for information purposes.
+ Or you can specify --remove-obsolete to remove all depreciated packages.
+ CAUTION: this can only take into consideration packages that are available
+ from your current sources. Thus self made packages will be considered
+ obsolete as well (they can be excluded within slapt-getrc, however). Only
+ use this if you have been using Slackware packages exclusively. You can
+ also use this option for information purposes, observing the obsolete
+ packages, then passing all the ones you are sure of to --remove (which can
+ accept multiple packages at once).
+ ### dist upgrade and remove all depreciated/obsolete packages
$ slapt-get --dist-upgrade --remove-obsolete
Then follow the rest of the directions in UPGRADE.TXT.
@@ -639,8 +641,9 @@
--dist-upgrade --remove-obsolete will remove any packages that Pat has removed
from current. CAUTION: this can only take into consideration packages that
are available from your current sources. Thus self made packages will be
- considered obsolete as well. Only use this if you have been using Slackware
- packages exclusively. You can also use this option for information purposes.
+ considered obsolete as well (they can be excluded within slapt-getrc, however).
+ Only use this if you have been using Slackware packages exclusively. You can
+ also use this option for information purposes.
<A NAME="slgFAQ29"><B>29. How would I script an ldd dependency hack with slapt-get?</B></A>
@@ -879,6 +882,9 @@
# slapt-get --dist-upgrade --remove-obsolete
+ NOTE: You will want to exclude any packages that are self made so they are
+ not removed.
+
<A NAME="slgFAQ41"><B>41. What provisions have you made for dialup users?</B></A>
diff --git a/src/action.c b/src/action.c
index fed191e..e9b7a97 100644
--- a/src/action.c
+++ b/src/action.c
@@ -490,12 +490,15 @@ void pkg_action_upgrade_all(const rc_config *global_config){
*/
deps = is_required_by(global_config,avail_pkgs,installed_pkgs->pkgs[r]);
for(c = 0; c < deps->pkg_count; c++ ){
- if( get_newest_pkg(installed_pkgs,deps->pkgs[c]->name) != NULL )
- add_remove_to_transaction(&tran,deps->pkgs[c]);
+ if( get_newest_pkg(avail_pkgs,deps->pkgs[c]->name) == NULL ){
+ if( is_excluded(global_config,deps->pkgs[c]) != 1 )
+ add_remove_to_transaction(&tran,deps->pkgs[c]);
+ }
}
free(deps->pkgs);
free(deps);
- add_remove_to_transaction(&tran,installed_pkgs->pkgs[r]);
+ if( is_excluded(global_config,installed_pkgs->pkgs[r]) != 1 )
+ add_remove_to_transaction(&tran,installed_pkgs->pkgs[r]);
}
}