update to 0.2.0
This commit is contained in:
parent
a32a89a091
commit
734f76db61
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
rpmreaper-0.1.6.tar.gz
|
||||
/rpmreaper-0.2.0.tar.gz
|
||||
|
@ -1,19 +0,0 @@
|
||||
commit ffa13f4493d75a1b32a3ff2c6e0e2206b15c3969
|
||||
Author: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Tue Aug 24 15:43:27 2010 +0200
|
||||
|
||||
print F2 as help key in help line
|
||||
|
||||
diff --git a/tui.c b/tui.c
|
||||
index 19fba8e..ca0c064 100644
|
||||
--- a/tui.c
|
||||
+++ b/tui.c
|
||||
@@ -106,7 +106,7 @@ void display_help() {
|
||||
attron(COLOR_PAIR(1));
|
||||
move(0, 0);
|
||||
hline(' ', COLS);
|
||||
- addnstr("q:Quit d,D,E:Del u,U,I:Undel r,R:Req b,B:ReqBy i:Info c,C:Commit F1:Help", COLS);
|
||||
+ addnstr("q:Quit d,D,E:Del u,U,I:Undel r,R:Req b,B:ReqBy i:Info c,C:Commit F2:Help", COLS);
|
||||
}
|
||||
|
||||
void display_status(const struct pkgs *p, const struct pkglist *l) {
|
@ -1,29 +0,0 @@
|
||||
commit 4a7d3d7c5de95f4a24bd760af3dd5df7c26bc6e4
|
||||
Author: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Wed Dec 4 16:05:38 2013 +0100
|
||||
|
||||
fix building with -Werror=format-security (rhbz#1037309)
|
||||
|
||||
diff --git a/rpm.c b/rpm.c
|
||||
index 374ebcd..28069e1 100644
|
||||
--- a/rpm.c
|
||||
+++ b/rpm.c
|
||||
@@ -337,15 +337,15 @@ static int rpm_pkg_info(const struct repo *repo, const struct pkgs *p, uint pid)
|
||||
r = rpmcname(cmd + j, len, p, pid);
|
||||
break;
|
||||
case -2:
|
||||
- r = snprintf(cmd + j, len, ((struct rpmrepodata *)repo->data)->root);
|
||||
+ r = snprintf(cmd + j, len, "%s", ((struct rpmrepodata *)repo->data)->root);
|
||||
break;
|
||||
case -3:
|
||||
- r = snprintf(cmd + j, len, pager);
|
||||
+ r = snprintf(cmd + j, len, "%s", pager);
|
||||
break;
|
||||
default:
|
||||
if (idx[i] < 0 || idx[i] >= sizeof (strs) / sizeof (char *))
|
||||
return 1;
|
||||
- r = snprintf(cmd + j, len, strs[(int)idx[i]]);
|
||||
+ r = snprintf(cmd + j, len, "%s", strs[(int)idx[i]]);
|
||||
break;
|
||||
}
|
||||
if (r < 0 || r >= len)
|
@ -1,12 +0,0 @@
|
||||
diff -up rpmreaper-0.1.6/Makefile.librpm rpmreaper-0.1.6/Makefile
|
||||
--- rpmreaper-0.1.6/Makefile.librpm 2009-04-02 10:18:29.000000000 +0200
|
||||
+++ rpmreaper-0.1.6/Makefile 2010-02-15 13:26:29.000000000 +0100
|
||||
@@ -2,7 +2,7 @@ NAME = rpmreaper
|
||||
VERSION = 0.1.6
|
||||
|
||||
CFLAGS = -O -g -Wall
|
||||
-LDFLAGS = -lrpmbuild -lncurses
|
||||
+LDFLAGS = -lrpm -lncurses
|
||||
|
||||
prefix = /usr/local
|
||||
bindir = $(prefix)/bin
|
@ -1,53 +0,0 @@
|
||||
commit 0ae72914bec9f385555e4a0827c37f7a6c927506
|
||||
Author: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Wed Jun 1 12:10:26 2011 +0200
|
||||
|
||||
call rpmcliFini() only on exit (rhbz#709421)
|
||||
|
||||
diff --git a/rpm.c b/rpm.c
|
||||
index 230818b..374ebcd 100644
|
||||
--- a/rpm.c
|
||||
+++ b/rpm.c
|
||||
@@ -86,13 +86,11 @@ static int rpm_read(const struct repo *repo, struct pkgs *p, uint firstpid) {
|
||||
rpmdbMatchIterator iter;
|
||||
Header header;
|
||||
uint pid;
|
||||
- char *argv[] = {""};
|
||||
#ifndef _RPM_4_4_COMPAT
|
||||
rpmtd sizetd;
|
||||
|
||||
sizetd = rpmtdNew();
|
||||
#endif
|
||||
- rd->context = rpmcliInit(1, argv, NULL);
|
||||
rd->ts = rpmtsCreate();
|
||||
rpmtsSetRootDir(rd->ts, ((struct rpmrepodata *)repo->data)->root);
|
||||
rpmtsSetVSFlags(rd->ts, _RPMVSF_NOSIGNATURES | _RPMVSF_NODIGESTS);
|
||||
@@ -299,7 +297,6 @@ static int rpm_read_provs(const struct repo *repo, struct pkgs *p, uint firstpid
|
||||
iter = rpmdbFreeIterator(iter);
|
||||
|
||||
rd->ts = rpmtsFree(ts);
|
||||
- rd->context = rpmcliFini(rd->context);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -406,11 +403,14 @@ static int rpm_remove_pkgs(const struct repo *repo, const struct pkgs *p, int fo
|
||||
}
|
||||
|
||||
static void rpm_repo_clean(struct repo *r) {
|
||||
+ rpmcliFini(((struct rpmrepodata *)r->data)->context);
|
||||
free(r->data);
|
||||
r->data = NULL;
|
||||
}
|
||||
|
||||
void rpm_fillrepo(struct repo *r, const char *root) {
|
||||
+ char *argv[] = {""};
|
||||
+
|
||||
r->repo_read = rpm_read;
|
||||
r->repo_read_provs = rpm_read_provs;
|
||||
r->repo_pkg_info = rpm_pkg_info;
|
||||
@@ -419,4 +419,5 @@ void rpm_fillrepo(struct repo *r, const char *root) {
|
||||
|
||||
r->data = malloc(sizeof (struct rpmrepodata));
|
||||
((struct rpmrepodata *)r->data)->root = root;
|
||||
+ ((struct rpmrepodata *)r->data)->context = rpmcliInit(1, argv, NULL);
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
commit 97481d9548fff559b8f19d2f134a003c4fe3d526
|
||||
Author: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Fri Jan 21 12:37:44 2011 +0100
|
||||
|
||||
use RPMDBI_PACKAGES tag when creating rpmdb iterator
|
||||
|
||||
diff --git a/rpm.c b/rpm.c
|
||||
index 405974f..8f20cde 100644
|
||||
--- a/rpm.c
|
||||
+++ b/rpm.c
|
||||
@@ -97,7 +97,7 @@ static int rpm_read(const struct repo *repo, struct pkgs *p, uint firstpid) {
|
||||
rpmtsSetRootDir(rd->ts, ((struct rpmrepodata *)repo->data)->root);
|
||||
rpmtsSetVSFlags(rd->ts, _RPMVSF_NOSIGNATURES | _RPMVSF_NODIGESTS);
|
||||
|
||||
- iter = rpmtsInitIterator(rd->ts, RPMTAG_NAME, NULL, 0);
|
||||
+ iter = rpmtsInitIterator(rd->ts, RPMDBI_PACKAGES, NULL, 0);
|
||||
for (pid = firstpid; (header = rpmdbNextIterator(iter)) != NULL; pid++) {
|
||||
#ifdef _RPM_4_4_COMPAT
|
||||
int i, ds1, ds2, ds3;
|
||||
commit 99455fd99fe541a15e6c7dcaab357fa89db038fb
|
||||
Author: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Mon Jan 31 17:31:48 2011 +0100
|
||||
|
||||
use RPMDBI_PACKAGES index also when reading provides
|
||||
|
||||
diff --git a/rpm.c b/rpm.c
|
||||
index 8f20cde..230818b 100644
|
||||
--- a/rpm.c
|
||||
+++ b/rpm.c
|
||||
@@ -192,7 +192,7 @@ static int rpm_read_provs(const struct repo *repo, struct pkgs *p, uint firstpid
|
||||
dirs = rpmtdNew();
|
||||
dirindexes = rpmtdNew();
|
||||
#endif
|
||||
- iter = rpmtsInitIterator(ts, RPMTAG_NAME, NULL, 0);
|
||||
+ iter = rpmtsInitIterator(ts, RPMDBI_PACKAGES, NULL, 0);
|
||||
|
||||
for (pid = firstpid; (header = rpmdbNextIterator(iter)) != NULL; pid++) {
|
||||
#ifdef _RPM_4_4_COMPAT
|
@ -1,5 +1,5 @@
|
||||
Name: rpmreaper
|
||||
Version: 0.1.6
|
||||
Version: 0.2.0
|
||||
Release: 14%{?dist}
|
||||
Summary: A tool for removing packages from system
|
||||
|
||||
@ -7,11 +7,6 @@ Group: Applications/System
|
||||
License: GPLv2+
|
||||
URL: https://fedorahosted.org/rpmreaper/
|
||||
Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
|
||||
Patch0: rpmreaper-0.1.6-librpm.patch
|
||||
Patch1: rpmreaper-0.1.6-f2help.patch
|
||||
Patch2: rpmreaper-0.1.6-rpmdbiter.patch
|
||||
Patch3: rpmreaper-0.1.6-rpmclifini.patch
|
||||
Patch4: rpmreaper-0.1.6-format.patch
|
||||
|
||||
BuildRequires: ncurses-devel rpm-devel
|
||||
Requires: less rpm
|
||||
@ -22,14 +17,9 @@ allows removing unnecessary packages and their dependencies from the system.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .librpm
|
||||
%patch1 -p1 -b .f2help
|
||||
%patch2 -p1 -b .rpmdbiter
|
||||
%patch3 -p1 -b .rpmclifini
|
||||
%patch4 -p1 -b .format
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
|
||||
make %{?_smp_mflags} EXTRA_CFLAGS="$RPM_OPT_FLAGS"
|
||||
|
||||
%install
|
||||
%makeinstall
|
||||
|
Loading…
Reference in New Issue
Block a user