diff --git a/bin/addpkg b/bin/addpkg index aac737d..97b08fa 100644 --- a/bin/addpkg +++ b/bin/addpkg @@ -66,6 +66,11 @@ if __name__ == "__main__": "--db-filename", help="alternative filename for database without extension", ) + parser.add_argument( + "--files-only", + action="store_true", + help="only add the built files to the repository", + ) parser.add_argument( "-s", "--sign", @@ -118,11 +123,12 @@ if __name__ == "__main__": syslog.critical("No package tarballs have been found, exiting") exit(E_NOFILESERR) - try: - repos.db_modify("add", db, *opts, *pkg_tarballs) - except repos.RepoAddError as e: - syslog.error(e) - exit(E_REPO_ADDERR) + if not args.files_only: + try: + repos.db_modify("add", db, *opts, *pkg_tarballs) + except repos.RepoAddError as e: + syslog.error(e) + exit(E_REPO_ADDERR) for pkgfile in (*pkg_tarballs, *sigfiles): add_pkgfile(pkgfile, cachedir) diff --git a/bin/delpkg b/bin/delpkg index 9888e35..c6e2259 100644 --- a/bin/delpkg +++ b/bin/delpkg @@ -61,6 +61,11 @@ if __name__ == "__main__": "--db-filename", help="alternative filename for database without extension", ) + parser.add_argument( + "--files-only", + action="store_true", + help="only add the built files to the repository", + ) parser.add_argument( "-s", "--sign", @@ -111,7 +116,8 @@ if __name__ == "__main__": for pkgfile in (*pkg_tarballs, *sigfiles): del_pkgfile(pkgfile) - try: - repos.db_modify("remove", db, *opts, *pkgs) - except repos.RepoAddError as e: - syslog.error(e) + if not args.files_only: + try: + repos.db_modify("remove", db, *opts, *pkgs) + except repos.RepoAddError as e: + syslog.error(e) diff --git a/setup.py b/setup.py index a507277..830ed59 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.rst", "r") as fh: setuptools.setup( name="packaging_scripts", - version="1.1.5", + version="1.1.6", author="Eric Russel Torres", author_email="erictorres4@protonmail.com", description="A set of helpers for automating borg interaction",