public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-projects commit in portage-utils: qsize.c
@ 2009-03-24 18:54 Fabian Groffen (grobian)
  0 siblings, 0 replies; 4+ messages in thread
From: Fabian Groffen (grobian) @ 2009-03-24 18:54 UTC (permalink / raw
  To: gentoo-commits

grobian     09/03/24 18:54:41

  Modified:             qsize.c
  Log:
  portage-utils-0.1.29-interix.patch
  
  Interix needs an extra define to compile this

Revision  Changes    Path
1.30                 portage-utils/qsize.c

file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qsize.c?rev=1.30&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qsize.c?rev=1.30&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qsize.c?r1=1.29&r2=1.30

Index: qsize.c
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- qsize.c	24 Mar 2009 18:53:33 -0000	1.29
+++ qsize.c	24 Mar 2009 18:54:41 -0000	1.30
@@ -1,7 +1,7 @@
 /*
  * Copyright 2005-2007 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v 1.29 2009/03/24 18:53:33 grobian Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v 1.30 2009/03/24 18:54:41 grobian Exp $
  *
  * Copyright 2005-2007 Ned Ludd        - <solar@gentoo.org>
  * Copyright 2005-2007 Mike Frysinger  - <vapier@gentoo.org>
@@ -32,7 +32,7 @@
 	"Ignore regexp string",
 	COMMON_OPTS_HELP
 };
-static const char qsize_rcsid[] = "$Id: qsize.c,v 1.29 2009/03/24 18:53:33 grobian Exp $";
+static const char qsize_rcsid[] = "$Id: qsize.c,v 1.30 2009/03/24 18:54:41 grobian Exp $";
 #define qsize_usage(ret) usage(ret, QSIZE_FLAGS, qsize_long_opts, qsize_opts_help, lookup_applet_idx("qsize"))
 
 #ifdef _AIX
@@ -40,6 +40,10 @@
 # define S_BLKSIZE DEV_BSIZE
 #endif
 
+#ifdef __INTERIX
+# define S_BLKSIZE S_BLOCK_SIZE
+#endif
+
 int qsize_main(int argc, char **argv)
 {
 	DIR *dir, *dirp;






^ permalink raw reply	[flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-projects commit in portage-utils: qsize.c
@ 2010-07-04 20:04 Diego Petteno (flameeyes)
  0 siblings, 0 replies; 4+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-07-04 20:04 UTC (permalink / raw
  To: gentoo-commits

flameeyes    10/07/04 20:04:06

  Modified:             qsize.c
  Log:
  When calculating the size of files, take ROOT into consideration.
  
  Without this change, qsize will not work properly when using ROOT= as
  the size taken into consideration is that of the files installed with ROOT=/.

Revision  Changes    Path
1.35                 portage-utils/qsize.c

file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/qsize.c?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/qsize.c?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/qsize.c?r1=1.34&r2=1.35

Index: qsize.c
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- qsize.c	7 Apr 2010 05:58:16 -0000	1.34
+++ qsize.c	4 Jul 2010 20:04:06 -0000	1.35
@@ -1,7 +1,7 @@
 /*
  * Copyright 2005-2010 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v 1.34 2010/04/07 05:58:16 solar Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v 1.35 2010/07/04 20:04:06 flameeyes Exp $
  *
  * Copyright 2005-2010 Ned Ludd        - <solar@gentoo.org>
  * Copyright 2005-2010 Mike Frysinger  - <vapier@gentoo.org>
@@ -32,7 +32,7 @@
 	"Ignore regexp string",
 	COMMON_OPTS_HELP
 };
-static const char qsize_rcsid[] = "$Id: qsize.c,v 1.34 2010/04/07 05:58:16 solar Exp $";
+static const char qsize_rcsid[] = "$Id: qsize.c,v 1.35 2010/07/04 20:04:06 flameeyes Exp $";
 #define qsize_usage(ret) usage(ret, QSIZE_FLAGS, qsize_long_opts, qsize_opts_help, lookup_applet_idx("qsize"))
 
 int qsize_main(int argc, char **argv)
@@ -49,6 +49,7 @@
 	size_t disp_units = 0;
 	const char *str_disp_units = NULL;
 	char buf[_Q_PATH_MAX];
+	char filename[_Q_PATH_MAX], *filename_root;
 	queue *ignore_regexp = NULL;
 
 	DBG("argc=%d argv[0]=%s argv[1]=%s",
@@ -77,6 +78,9 @@
 
 	num_all_bytes = num_all_files = num_all_nonfiles = num_all_ignored = 0;
 
+	strcpy(filename, portroot);
+	filename_root = filename + strlen(filename);
+
 	/* open /var/db/pkg */
 	while ((dentry = q_vdb_get_next_dir(dir))) {
 
@@ -130,8 +134,9 @@
 					continue;
 
 				if (e->type == CONTENTS_OBJ || e->type == CONTENTS_SYM) {
+					strcpy(filename_root, e->name);
 					++num_files;
-					if (!lstat(e->name, &st))
+					if (!lstat(filename, &st))
 						num_bytes += (fs_size ? st.st_blocks * S_BLKSIZE : st.st_size);
 				} else
 					++num_nonfiles;






^ permalink raw reply	[flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-projects commit in portage-utils: qsize.c
@ 2009-09-08 17:21 Fabian Groffen (grobian)
  0 siblings, 0 replies; 4+ messages in thread
From: Fabian Groffen (grobian) @ 2009-09-08 17:21 UTC (permalink / raw
  To: gentoo-commits

grobian     09/09/08 17:21:50

  Modified:             qsize.c
  Log:
  Add support for HPUX and FreeMiNT by Michael Haubenwallner and Alan Hourihane

Revision  Changes    Path
1.31                 portage-utils/qsize.c

file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qsize.c?rev=1.31&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qsize.c?rev=1.31&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qsize.c?r1=1.30&r2=1.31

Index: qsize.c
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- qsize.c	24 Mar 2009 18:54:41 -0000	1.30
+++ qsize.c	8 Sep 2009 17:21:50 -0000	1.31
@@ -1,7 +1,7 @@
 /*
  * Copyright 2005-2007 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v 1.30 2009/03/24 18:54:41 grobian Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v 1.31 2009/09/08 17:21:50 grobian Exp $
  *
  * Copyright 2005-2007 Ned Ludd        - <solar@gentoo.org>
  * Copyright 2005-2007 Mike Frysinger  - <vapier@gentoo.org>
@@ -32,7 +32,7 @@
 	"Ignore regexp string",
 	COMMON_OPTS_HELP
 };
-static const char qsize_rcsid[] = "$Id: qsize.c,v 1.30 2009/03/24 18:54:41 grobian Exp $";
+static const char qsize_rcsid[] = "$Id: qsize.c,v 1.31 2009/09/08 17:21:50 grobian Exp $";
 #define qsize_usage(ret) usage(ret, QSIZE_FLAGS, qsize_long_opts, qsize_opts_help, lookup_applet_idx("qsize"))
 
 #ifdef _AIX
@@ -44,6 +44,10 @@
 # define S_BLKSIZE S_BLOCK_SIZE
 #endif
 
+#ifdef __hpux
+# define S_BLKSIZE st.st_blksize
+#endif
+
 int qsize_main(int argc, char **argv)
 {
 	DIR *dir, *dirp;






^ permalink raw reply	[flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-projects commit in portage-utils: qsize.c
@ 2007-11-04  9:03 Ned Ludd (solar)
  0 siblings, 0 replies; 4+ messages in thread
From: Ned Ludd (solar) @ 2007-11-04  9:03 UTC (permalink / raw
  To: gentoo-commits

solar       07/11/04 09:03:43

  Modified:             qsize.c
  Log:
  casting

Revision  Changes    Path
1.28                 portage-utils/qsize.c

file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qsize.c?rev=1.28&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qsize.c?rev=1.28&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/portage-utils/qsize.c?r1=1.27&r2=1.28

Index: qsize.c
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- qsize.c	7 Jun 2007 19:47:48 -0000	1.27
+++ qsize.c	4 Nov 2007 09:03:42 -0000	1.28
@@ -1,7 +1,7 @@
 /*
  * Copyright 2005-2007 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v 1.27 2007/06/07 19:47:48 solar Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qsize.c,v 1.28 2007/11/04 09:03:42 solar Exp $
  *
  * Copyright 2005-2007 Ned Ludd        - <solar@gentoo.org>
  * Copyright 2005-2007 Mike Frysinger  - <vapier@gentoo.org>
@@ -32,7 +32,7 @@
 	"Ignore regexp string",
 	COMMON_OPTS_HELP
 };
-static const char qsize_rcsid[] = "$Id: qsize.c,v 1.27 2007/06/07 19:47:48 solar Exp $";
+static const char qsize_rcsid[] = "$Id: qsize.c,v 1.28 2007/11/04 09:03:42 solar Exp $";
 #define qsize_usage(ret) usage(ret, QSIZE_FLAGS, qsize_long_opts, qsize_opts_help, lookup_applet_idx("qsize"))
 
 int qsize_main(int argc, char **argv)
@@ -149,7 +149,7 @@
 				       (unsigned long)num_files,
 				       (unsigned long)num_nonfiles);
 				if (num_ignored)
-					printf("%lu names-ignored, ", num_ignored);
+					printf("%lu names-ignored, ", (unsigned long)num_ignored);
 				if (disp_units)
 					printf("%s %s\n",
 					       make_human_readable_str(num_bytes, 1, disp_units),
@@ -169,7 +169,7 @@
 		       (unsigned long)num_all_files,
 		       (unsigned long)num_all_nonfiles);
 		if (num_all_ignored)
-			printf("%lu names-ignored, ", num_all_ignored);
+			printf("%lu names-ignored, ", (unsigned long)num_all_ignored);
 		if (disp_units)
 			printf("%s %s\n",
 			       make_human_readable_str(num_all_bytes, 1, disp_units),



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-04 20:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 18:54 [gentoo-commits] gentoo-projects commit in portage-utils: qsize.c Fabian Groffen (grobian)
  -- strict thread matches above, loose matches on Subject: below --
2010-07-04 20:04 Diego Petteno (flameeyes)
2009-09-08 17:21 Fabian Groffen (grobian)
2007-11-04  9:03 Ned Ludd (solar)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox