Re: How to remove old source file?
On Mon, 16 Nov, 2015 at 00:42:10 GMT, Kevin Kofler wrote: > Till Maas wrote: >> It also breaks git clean which is used to clean files. What is the >> reason that making .gitignore append-only would be useful btw? > > If I don't bother cleaning away the old tarballs, I don't want them to show > up as uncommitted files in git-cola (or command-line "git status", I suppose > – I always use git-cola), polluting my list of files to commit. You can set up a global .gitignore. The reasoning is that adding .*.sw* to every repo just because you use Vim is silly. It is, of course, overriden by any "don't exclude" lines in a repo-local .gitignore file. Here's some of my configuration: .config/git/config: [core] excludesfile = ~/.local/share/git/gitignore .local/share/git/gitignore: # Vim backup files .*.sw* .*.un~ # Object files *.o *.obj # Autotools *.lo *.la .libs/ .deps/ autom4te.cache/ .dirstamp # gettext *.gmo *.pot # Python files *.pyc *.pyo __pycache__/ # Tarballs and zip files *.rar *.tar.* *.tgz *.zip --Ben -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
On Sun, Nov 15, 2015 at 08:01:15PM +0100, Kevin Kofler wrote: > Detecting obsolete tarballs is not what git status is for. It should only be > listing files that really need to be added to git (or to the lookaside > cache). It also breaks git clean which is used to clean files. What is the reason that making .gitignore append-only would be useful btw? What is the proper way in your opinion to clean all tarball but the required ones? Regards Till -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
On Sun, Nov 15, 2015 at 8:59 PM, Kevin Koflerwrote: > Jan Kratochvil wrote: >> There is also ".gitignore" file which is sometimes unmaintained and huge. > > This is a feature. If you still have old tarballs in your checkout, they > should be ignored as well as the current ones. I don't like fedpkg mucking with .gitignore every time, so I just add "/*.tar.*" or whatever is appropriate for the package's tarballs there. A working git clean would be a good thing to have though. -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
Jan Kratochvil wrote: > That's IMO not right because then you have left many old useless .tar.gz > files in that directory and 'git status' does not say they are no longer > used. Detecting obsolete tarballs is not what git status is for. It should only be listing files that really need to be added to git (or to the lookaside cache). Kevin Kofler -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
On Sun, Nov 15, 2015 at 08:45:04PM +0100, Till Maas wrote: > On Sun, Nov 15, 2015 at 08:01:15PM +0100, Kevin Kofler wrote: > > > Detecting obsolete tarballs is not what git status is for. It should only > > be > > listing files that really need to be added to git (or to the lookaside > > cache). > > It also breaks git clean which is used to clean files. What is the > reason that making .gitignore append-only would be useful btw? > What is the proper way in your opinion to clean all tarball but the > required ones? git clean -xdf fedpkg sources Of course it downloads the tarballs again :-/ I think it would be a nice fix to fedpkg to have 'fedpkg clean' do something smarter than just pass through to 'git clean'. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/ -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
Till Maas wrote: > It also breaks git clean which is used to clean files. What is the > reason that making .gitignore append-only would be useful btw? If I don't bother cleaning away the old tarballs, I don't want them to show up as uncommitted files in git-cola (or command-line "git status", I suppose – I always use git-cola), polluting my list of files to commit. Kevin Kofler -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
Jan Kratochvil wrote: > There is also ".gitignore" file which is sometimes unmaintained and huge. This is a feature. If you still have old tarballs in your checkout, they should be ignored as well as the current ones. There is a reason fedpkg new-sources does NOT remove old entries from .gitignore. .gitignore should only ever be added to, not removed from (unless something that actually belongs into git got added there by mistake, of course). Kevin Kofler -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
So, deleting the entry in the "sources" file delete the file in the lookaside cache? Thanks. Il 14/11/2015 11:41, Michael Schwendt ha scritto: On Sat, 14 Nov 2015 10:51:07 +0100, Mattia Verga wrote: Hi, I have uploaded a new source file in lookaside cache with the 'fedpkg upload' command. I can't use 'fedpkg new-sources' because I have many other source file that I want to keep. Now how can I delete the old source file replaced by the new one? Thanks. The "sources" file is maintained within the git repository just like the spec file, patches and anything added via git. You can edit and commit to the file. -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
On Sat, 14 Nov 2015 12:58:29 +0100 Mattia Vergawrote: > So, deleting the entry in the "sources" file delete the file in the > lookaside cache? nope, files are removed from the lookaside cache only for legal reasons Dan > Thanks. > > Il 14/11/2015 11:41, Michael Schwendt ha scritto: > > On Sat, 14 Nov 2015 10:51:07 +0100, Mattia Verga wrote: > > > >> Hi, > >> I have uploaded a new source file in lookaside cache with the > >> 'fedpkg upload' command. I can't use 'fedpkg new-sources' because > >> I have many other source file that I want to keep. > >> > >> Now how can I delete the old source file replaced by the new one? > >> Thanks. > > The "sources" file is maintained within the git repository just like > > the spec file, patches and anything added via git. You can edit and > > commit to the file. > > -- > devel mailing list > devel@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/devel > Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
On Sat, 14 Nov 2015 10:51:07 +0100, Mattia Verga wrote: > Hi, > I have uploaded a new source file in lookaside cache with the 'fedpkg > upload' command. I can't use 'fedpkg new-sources' because I have many > other source file that I want to keep. > > Now how can I delete the old source file replaced by the new one? > Thanks. The "sources" file is maintained within the git repository just like the spec file, patches and anything added via git. You can edit and commit to the file. -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
On Sat, Nov 14, 2015 at 10:51:07AM +0100, Mattia Verga wrote: > Hi, > I have uploaded a new source file in lookaside cache with the > 'fedpkg upload' command. I can't use 'fedpkg new-sources' because I > have many other source file that I want to keep. > > Now how can I delete the old source file replaced by the new one? Basically you don't need to delete the old file from the lookaside cache. If it contained some problematic content (eg. content that wasn't legal to redistribute) then file a ticket[1], but normally you would just ignore the old file. The old file might still be needed for builds in other branches. Rich. [1] https://fedorahosted.org/rel-eng/ -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
On Sat, 14 Nov 2015 11:41:32 +0100, Michael Schwendt wrote: > The "sources" file is maintained within the git repository There is also ".gitignore" file which is sometimes unmaintained and huge. Jan -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
On Sat, Nov 14, 2015 at 01:40:21PM +0100, Jan Kratochvil wrote: > On Sat, 14 Nov 2015 11:41:32 +0100, Michael Schwendt wrote: > > The "sources" file is maintained within the git repository > > There is also ".gitignore" file which is sometimes unmaintained and huge. A less-known feature of fedpkg is that if you add wildcards to .gitignore, then fedpkg does the right thing and will not add new entries to .gitignore each time you upload a file. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Re: How to remove old source file?
On Sat, 14 Nov 2015 17:27:04 +0100, Richard W.M. Jones wrote: > A less-known feature of fedpkg is that if you add wildcards to > .gitignore, then fedpkg does the right thing and will not add new > entries to .gitignore each time you upload a file. That's IMO not right because then you have left many old useless .tar.gz files in that directory and 'git status' does not say they are no longer used. Jan -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct