summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--po/cs.po6
-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/it.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/slapt-get.pot6
-rw-r--r--po/sv.po6
-rw-r--r--po/vi.po6
-rw-r--r--src/main.h1
-rw-r--r--src/transaction.c26
-rw-r--r--src/transaction.h1
20 files changed, 110 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 0216ab5..f00726f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
-0.9.9g Jan 26, 2005
+0.9.9g Jan 27, 2005
+ * added check before downloading any packages that there is enough disk
+ space to accomodate both downloads and installed pkgs
* added aaa_elflibs to the default exclude
* fixed required_by() function for deep leveled recursive dependencies
* moved package order so that package always follows it's dependencies
diff --git a/po/cs.po b/po/cs.po
index 3effdbd..11b5fb1 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -483,3 +483,7 @@ msgstr "required pli dlouh\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr ""
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Na %s nemáte dostatek volného místa"
+
diff --git a/po/de.po b/po/de.po
index 159dba0..d005fdb 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+0500\n"
"Last-Translator: Niklas Volbers <mithrandir42@web.de>\n"
"Language-Team: slapt-get-devel <slapt-get-devel@software.jaos.org>\n"
"MIME-Version: 1.0\n"
@@ -482,3 +482,7 @@ msgstr "required zu lang\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr "entferne veraltete Pakete (nur bei dist-upgrade)"
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Sie haben nicht genug freien Platz in %s"
+
diff --git a/po/el.po b/po/el.po
index ff40e4a..ce8666f 100644
--- a/po/el.po
+++ b/po/el.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -477,3 +477,7 @@ msgstr ""
msgid "remove obsolete packages (dist-upgrade only)"
msgstr ""
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Δεν διαθέτετε αρκετό ελεύθερο χώρο στο %s"
+
diff --git a/po/en.po b/po/en.po
index b811385..841ad99 100644
--- a/po/en.po
+++ b/po/en.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -481,3 +481,7 @@ msgstr "required too long\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr "remove obsolete packages (dist-upgrade only)"
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "You don't have enough free space in %s"
+
diff --git a/po/es.po b/po/es.po
index 27d74a7..f5d0b8e 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -481,3 +481,7 @@ msgstr "requerido demasiado largo\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr ""
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "No tiene suficiente espacio libre en %s"
+
diff --git a/po/es_ES.po b/po/es_ES.po
index b0c9c6d..ddc52fa 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -481,3 +481,7 @@ msgstr "requerido demasiado largo\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr ""
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "No tiene suficiente espacio libre en %s"
+
diff --git a/po/fr.po b/po/fr.po
index 5e88678..7d38425 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -483,3 +483,7 @@ msgstr ""
msgid "remove obsolete packages (dist-upgrade only)"
msgstr ""
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Pas assez d'espace disponible sur %s"
+
diff --git a/po/it.po b/po/it.po
index 2e3a099..df60e3e 100644
--- a/po/it.po
+++ b/po/it.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+0500\n"
"Last-Translator: Francesco Gigli <jaramir@slack.it>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
"MIME-Version: 1.0\n"
@@ -481,3 +481,7 @@ msgstr "richiesto troppo lungo\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr ""
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Lo spazio libero in %s non sufficente"
+
diff --git a/po/nl.po b/po/nl.po
index c882c09..777c9ff 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -481,3 +481,7 @@ msgstr ""
msgid "remove obsolete packages (dist-upgrade only)"
msgstr ""
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "U heeft niet voldoende vrije schijfruimte op %s"
+
diff --git a/po/no.po b/po/no.po
index 572e635..9264e02 100644
--- a/po/no.po
+++ b/po/no.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -481,3 +481,7 @@ msgstr "kreves for lang\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr "fjern gamle pakker (kun dist-oppgradering)"
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Du har ikke nok ledig plass i %s"
+
diff --git a/po/pl.po b/po/pl.po
index 2167e39..2cd2019 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -482,3 +482,7 @@ msgstr "required za duy\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr "usu przestarzae pakiety (tylko dist-upgrade)"
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "W %s nie ma wystarczajcej iloci wolnego miejsca"
+
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 8d4baee..99a8e8a 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -480,3 +480,7 @@ msgstr ""
msgid "remove obsolete packages (dist-upgrade only)"
msgstr ""
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Voc no possui espao livre suficiente em %s"
+
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 2018358..0bd858a 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -480,3 +480,7 @@ msgstr "requerido muito longo\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr "remover pacotes obsoletos (apenas em dist-upgrade)"
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Voc no possui espao livre suficiente em %s"
+
diff --git a/po/slapt-get.pot b/po/slapt-get.pot
index 1cde881..d76e1da 100644
--- a/po/slapt-get.pot
+++ b/po/slapt-get.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -483,3 +483,7 @@ msgstr ""
msgid "remove obsolete packages (dist-upgrade only)"
msgstr ""
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr ""
+
diff --git a/po/sv.po b/po/sv.po
index 99a96cf..09a1654 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -481,3 +481,7 @@ msgstr "krav fr lngt\n"
msgid "remove obsolete packages (dist-upgrade only)"
msgstr "ta bort frlegade paket (endast dist-uppgradering)"
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr "Du har inte tillrckligt ledigt utrymme i %s"
+
diff --git a/po/vi.po b/po/vi.po
index b59761e..0c52e55 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.9.9g\n"
"POT-Creation-Date: 2003-11-03 14:28+0000\n"
-"PO-Revision-Date: 2005-01-21 17:36+0500\n"
+"PO-Revision-Date: 2005-01-27 12:31+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"
@@ -488,3 +488,7 @@ msgstr "yêu cầu quá dài\n"
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 --dist-upgrade)"
+#, c-format
+msgid "You don't have enough free space in %s"
+msgstr ""
+
diff --git a/src/main.h b/src/main.h
index 35008c4..5bf0665 100644
--- a/src/main.h
+++ b/src/main.h
@@ -34,6 +34,7 @@
#include <openssl/evp.h>
#include <libintl.h>
#include <locale.h>
+#include <sys/statvfs.h>
#include "common.h"
#include "configuration.h"
diff --git a/src/transaction.c b/src/transaction.c
index ca36a2c..6b9212c 100644
--- a/src/transaction.c
+++ b/src/transaction.c
@@ -168,6 +168,14 @@ int handle_transaction(const rc_config *global_config, transaction_t *tran){
/* make sure it's not negative due to changing pkg sizes on upgrades */
if( need_to_download_size < 0 ) need_to_download_size = 0;
+ if(disk_space(global_config,need_to_download_size+uncompressed_size) != 0){
+ printf(
+ _("You don't have enough free space in %s"),
+ global_config->working_dir
+ );
+ return 1;
+ }
+
if( already_download_size > 0 ){
printf(_("Need to get %dK/%dK of archives.\n"),
need_to_download_size, download_size
@@ -202,7 +210,7 @@ int handle_transaction(const rc_config *global_config, transaction_t *tran){
) {
if( ask_yes_no(_("Do you want to continue? [y/N] ")) != 1 ){
printf(_("Abort.\n"));
- return 0;
+ return 1;
}
}
@@ -689,3 +697,19 @@ static void add_suggestion(transaction_t *tran, pkg_info_t *pkg){
}
}
+
+int disk_space(const rc_config *global_config,int space_needed ){
+ struct statvfs statvfs_buf;
+
+ space_needed *= 1024;
+
+ if( statvfs(global_config->working_dir,&statvfs_buf) != 0 ){
+ if( errno ) perror("statvfs");
+ return 1;
+ }else{
+ if( statvfs_buf.f_bfree < ( space_needed / statvfs_buf.f_bsize) )
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/src/transaction.h b/src/transaction.h
index 728dd74..a455ea7 100644
--- a/src/transaction.h
+++ b/src/transaction.h
@@ -43,4 +43,5 @@ transaction_t *remove_from_transaction(transaction_t *tran,pkg_info_t *pkg);
int add_deps_to_trans(const rc_config *global_config, transaction_t *tran, struct pkg_list *avail_pkgs, struct pkg_list *installed_pkgs, pkg_info_t *pkg);
/* check to see if a package is conflicted */
pkg_info_t *is_conflicted(transaction_t *tran, struct pkg_list *avail_pkgs, struct pkg_list *installed_pkgs, pkg_info_t *pkg);
+int disk_space(const rc_config *global_config,int space_needed );