mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-21 06:08:06 -05:00
A new user might think that APPDIR is the location of the app to be built, and run something like `xdg-app-builder . ./manifest`. This could silently the user's entire project that they are trying to package, which is not acceptable at all! Even if you think it is their fault for not reading the manual first! This commit means that APPDIR is no longer deleted. Instead, xdg-app-builder checks whether it is empty and, if it is not, it asks the user to delete the contents and then rerun it. This means you now have to do `rm -Rf APPDIR; xdg-app-builder APPDIR MANIFEST` when developing your manifest, but I think that's better than having a build tool that can optionally delete your whole project.
52 lines
1.7 KiB
C
52 lines
1.7 KiB
C
/*
|
|
* Copyright © 2015 Red Hat, Inc
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* Authors:
|
|
* Alexander Larsson <alexl@redhat.com>
|
|
*/
|
|
|
|
#ifndef __BUILDER_UTILS_H__
|
|
#define __BUILDER_UTILS_H__
|
|
|
|
#include <gio/gio.h>
|
|
#include <libsoup/soup.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
typedef struct BuilderUtils BuilderUtils;
|
|
|
|
char *builder_uri_to_filename (const char *uri);
|
|
|
|
gboolean strip (GError **error, ...);
|
|
gboolean eu_strip (GError **error, ...);
|
|
|
|
gboolean is_elf_file (const char *path,
|
|
gboolean *is_shared,
|
|
gboolean *is_stripped);
|
|
|
|
gboolean directory_is_empty (const char *path);
|
|
|
|
gboolean xdg_app_matches_path_pattern (const char *path,
|
|
const char *pattern);
|
|
void xdg_app_collect_matches_for_path_pattern (const char *path,
|
|
const char *pattern,
|
|
const char *add_prefix,
|
|
GHashTable *to_remove_ht);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __BUILDER_UTILS_H__ */
|